import request from '@/utils/request'

// 讲师列表分页查询
// current当前页，size每页的记录数，teacherQuery条件对象
export default {
    getTeacherListPage(current,size,teacherQuery) {
        return request({
            url: `/admin/courses/pageTeacherCondition/${current}/${size}`,
            method: 'post',
            data: teacherQuery // data:讲对象转换成json传递
        })
    },

    deleteTeacherById(id) {
        return request({
            url: `/admin/courses/${id}`,
            method: 'delete'
        })
     },

     save(teacher) {
        return request({
            url: `/admin/courses/addTeacher`,
            method: 'post',
            data: teacher
        })
     },

     getById(id) {
        return request({
            url: `/admin/courses/getTeacher/${id}`,
            method: 'get'
        })
     },

     updateTeacher(teacher) {
        return request({
            url: `/admin/courses/updateTeacher`,
            method: 'post',
            data: teacher
        })
     }
}
